Session 1: Hello World!
A Text Editor can very basic...
... or very powerful
git-for-windows.github.io)xcode-select --installdesktop.github.com)atom.io/beta)pwdlsls -als -lhcat or lessls, cat, less are commands, programs just like the icons in your Dock-a, -lh, etc. are arguments: options you provide to the program to tell it what to do.Git is a command-line program for version control. You can think of it like MS Word's "track changes" feature, but applied to a folder full of files instead of just one document.
It is powerful but also very complex. We will stick with the basics for this course.
A repository is a collection of files and folders that Git is keeping track of. You can turn any folder into a git repository by navigating to it in your terminal and typing git init.
The basic unit of Git is the commit. As you make changes to the files in your repository, you can use git commit to take a snapshot. Only the changes in files you explicitly add will be recorded in each commit.
A commit should contain a short description and an optional longer message that explains what was changed.
Over time the commits in a repository can become a detailed history of all the changes that have been made in a project. You can even "time travel" to revert a change or undo a mistake made at any point in the past.
Git is also a distributed version control system. This means that each repository can be copied in many different locations.
Cloning lets you download an identical copy of a repository onto your machine so you can edit it locally.
Forking lets you make a copy that is entirely your own, which you can modify and redistribute however you see fit.
git clone https://github.com/getty-code-camp/ex-1-1.git
cd ex-1-1
git status
git log
git checkout initial-commit
git checkout first-update
git checkout mastergit clone https://github.com/YOUR_USER_NAME/ex-1-1.git# Create a new file
touch textfile_3.txt
# Edit this file in your editor.
# When you are ready, you can commit the changes:
# You can do this via the terminal or in Atom.
git add textfile_3.txt
git commit -m "Added a new file."git push -u origin master